#pragma once


typedef char cmd_line[512];

typedef struct history_entry
{
  unsigned char last; 
  cmd_line entries[20];
} history_entry;
extern history_entry CSSH_history;


/*Add command line to history array*/
void 
add_history_entry ( const char * cmdline);


/*list all commandlines stored in history*/
void 
list_history_entries(void );


/*overwrite history fille with current history*/
void 
save_to_file( const char * fname);

/*overwrite curent history with stored in file one*/
void 
read_from_file( const char * fname );

/*get last stored comandlie*/
const char *
get_last_cmd(void);

/*get command nb in not exist in history return 0(null)*/
const char * 
get_cmd_nb(unsigned char nb);
